﻿using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace ALMDDD.AspNetCore.Common
{
    public class NetCoreHelper
    {
        public static string GetConnectionString(string key)
        {
            var config = new ConfigurationBuilder()
               .SetBasePath(Directory.GetCurrentDirectory())
               .AddJsonFile("Appsettings.json")
               .Build();

            return config.GetConnectionString(key);
        }
    }
}
